<!--  档案统计-->
<template>
  <el-card class="box-card">
    <el-tabs v-model="activeName">
      <el-tab-pane label="上下架统计" name="first">
        <UpAndDownShelves :activeName="activeName"></UpAndDownShelves>
      </el-tab-pane>
      <el-tab-pane label="馆藏统计" name="second">
        <CollectionStat :activeName="activeName"></CollectionStat>
      </el-tab-pane>
      <el-tab-pane label="出入库统计" name="third">
        <UtilizingStat :activeName="activeName"></UtilizingStat>
      </el-tab-pane>
      <el-tab-pane label="通道门统计" name="fourth">
        <InOutStat :activeName="activeName"></InOutStat>
      </el-tab-pane>
    </el-tabs>
  </el-card>
</template>

<script>
import CollectionStat from './CollectionStat.vue'
import InOutStat from './InOutStat.vue'
import UpAndDownShelves from './UpAndDownShelves.vue'
import UtilizingStat from './UtilizingStat.vue'
export default {
  name: 'amsStat',
  components: {
    CollectionStat,
    InOutStat,
    UpAndDownShelves,
    UtilizingStat,
  },
  data() {
    return {
      activeName: 'first',
    }
  },
  computed: {},
  watch: {
    activeName(newVal) {
      this.resizeChart()
    },
  },
  created() {},
  mounted() {},
  methods: {
    resizeChart(refName) {
      const chart = this[refName]
      if (chart) {
        chart.resize()
      }
    },
  },
}
</script>
<style lang="less" scoped></style>
